#include <iostream>
using namespace std;
int main() {
  double x;
  int n;
  cin >> x >> n;
  auto f = [](auto& self, double x, int n) {
    if (n == 1) return x / (x + 1);
    return x / (n + self(self, x, n - 1));
  };
  cout.precision(2);
  cout << fixed;
  cout << f(f, x, n) << endl;
}